import { request } from 'umi';

// 获取文章列表
export let getArticleList = (page: number = 1) => {
  return request(`/api/article`, {
    params: {
      page,
      pageSize: '12',
      status: 'publish',
    },
  });
};

export let getArticleRecommend = () => {
  return request('/api/article/recommend');
};

// 获取归档列表
export let getArchiveList = () => {
  return request('/api/article/archives');
};

// 获取标签列表
export function getTagList() {
  return request('/api/tag');
}
